<template>
    <example :template-code="templateString">
        <template #describe>
            <t :id="`${$t('区间选择')}`">{{ $t('区间选择') }}</t>
        </template>
        <div style="width: 500px;color:#666;">
            <sib-item v-model="value" :props="props" @change="change"></sib-item>
            <p>v-model 绑定值：{{ value }}</p>
        </div>
    </example>
</template>

<script>
import { ref, reactive } from 'vue';

export default {
    setup() {
        const value = ref(['09:00', '10:30']);
        const props = reactive({
            type: 'droptime',
            isRange: true,
        });
        const change = (data) => {
            console.log('data: ', data);
        };

        return {
            props,
            value,
            change,
            templateString: `<template>
    <sib-item v-model="value" :props="props" @change="change"></sib-item>
    <p>v-model 绑定值：{{ value }}</p>
</template>

<script>
import { ref, reactive } from 'vue';

export default {
    setup() {
        const value = ref(['09:00', '10:30']);
        const props = reactive({
            type: 'droptime',
            isRange: true,
        });
        const change = (data) => {
            console.log('data: ', data);
        };

        return { props, value, change };
    },
};
<\/script>`,
        };
    },
};
</script>
